#include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using ll = long long;
using ull = unsigned long long;
using i128 = __int128;
const double N = 1e-7;

struct stru {
    double x, y;
};

stru a, b, c, d, e, f;
double p, q, r;

double dis(stru a, stru b) {
    return sqrt(N + (a.x - b.x) * (a.x - b.x) + (a.y - b.y) * (a.y - b.y));
}

double cal2(double A, double B) {
    e.x = a.x + (B / dis(a, b) * (b.x - a.x));
    e.y = a.y + (B / dis(a, b) * (b.y - a.y));
    f.x = c.x + (A / dis(c, d) * (d.x - c.x));
    f.y = c.y + (A / dis(c, d) * (d.y - c.y));
    return (dis(c, d) - A) / q + B / p + dis(e, f) / r;
}

double cal1(double x) {
    double l = 0, r = dis(c, d);
    int t = 100;
    while (t--) {
        double m1 = l + (r - l) / 3;
        double m2 = r - (r - l) / 3;
        if (cal2(m1, x) < cal2(m2, x)) {
            r = m2;
        } else {
            l = m1;
        }
    }
    return cal2(l, x);
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    cin >> a.x >> a.y >> b.x >> b.y >> c.x >> c.y >> d.x >> d.y;
    cin >> p >> q >> r;
    double l = 0, r = dis(a, b);
    int t = 100;
    while (t--) {
        double m1 = l + (r - l) / 3;
        double m2 = r - (r - l) / 3;
        if (cal1(m1) < cal1(m2)) {
            r = m2;
        } else {
            l = m1;
        }
    }
    printf("%.2f\n", cal1(l));

    return 0;
}